package com.ITArmy.util.login;
//抽取出来的参数【代码拷贝下来只需要修改成自己的CLIENT_ID，Client CLIENT_SECRET，CALLBACK即可】
public class GitHubConstants {
    public static final String CLIENT_ID = "69874184b0ce5052b95b"; // TODO 修改成自己的
    public static final String CLIENT_SECRET = "7b9ed1775d1c23f793f9345d163e5ec06f71a8e4";  // TODO 修改成自己的
    public static final String CALLBACK = "http://localhost:8080/callback";  // TODO 修改成自己的  [注意：callback要和注册的回调路径保持一致  否则登录授权之后会报NullPointerException]
    //获取code的url
    public static final String CODE_URL = "https://github.com/login/oauth/authorize?client_id=CLIENT_ID&state=STATE&redirect_uri=CALLBACK";
    //获取token的url
    public static final String TOKEN_URL = "https://github.com/login/oauth/access_token?client_id=CLIENT_ID&client_secret=CLIENT_SECRET&code=CODE&redirect_uri=CALLBACK";
    //获取用户信息的url
    public static final String USER_INFO_URL = "https://api.github.com/user?access_token=TOKEN";
}
